// 导入express模块
const express = require('express')
const user = require('./user')
const list = require('./list')
// 创建应用
const app = express()


const fistrCb = (req, res, next) => {
    console.log('abin is good');
    next()
}

const secondCb =  (req, res) => {
    res.send('首页')
}

// 设置路由
app.get('/', [fistrCb, secondCb])

app.use('/user', user)
app.use('/list', list)

app.listen(8899, () => {
    console.log('listen on 8899');
})